<template>
  <div>
    <Header />
    <section class="post-list">
      <div class="post-list-header">
        <p class="list-title">最新职位列表</p>
        <div class="btn-filter" @click="searchVisible = true">
          <i class="icon icon-filter"></i>
          筛选
        </div>
      </div>
      <div class="post-list-content">
        <van-list
          v-model:loading="pageParams.loading"
          v-model:error="pageParams.error"
          :finished="pageParams.finished"
          :finished-text="pageParams.finishedText"
          error-text="请求失败，点击重新加载"
          @load="onLoad"
        >
          <PostItem
            v-for="item in postList"
            :key="item"
            :post="item"
            type="home"
          />
        </van-list>
      </div>
    </section>
  </div>
</template>
<script setup>
import { ref } from "vue";
import Header from "@/components/Header.vue";
</script>
<style lang="scss" scoped>
.post-list {
  .post-list-header {
    display: flex;
    justify-content: space-between;
    padding-right: 16px;
    font-size: 14px;
  }
  .list-title {
    position: relative;
    padding-left: 28px;
    font-size: 14px;
    font-weight: bold;

    &::before {
      position: absolute;
      top: 1px;
      left: 16px;
      content: "";
      width: 4px;
      height: 18px;
      background-color: $baseColor;
      border-radius: 4px;
    }
  }
}
</style>